-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add integration tests against Postgres.js #479
Conversation
f94e985
to
1ed6868
Compare
2279197
to
5903fbf
Compare
1826e32
to
f6d8907
Compare
initialScript = '' | ||
${builtins.readFile ./dev/postgres/00-setup.sql} | ||
|
||
CREATE USER postgres SUPERUSER PASSWORD 'postgres'; | ||
''; | ||
listen_addresses = "127.0.0.1"; | ||
port = 6432; | ||
settings = { | ||
max_prepared_transactions = 262143; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is maximal possible value, in tests I have set it to 2000
as it doesn't matter really as long as it is greater than 0
I think.
otp-version: '25.3.2.7' | ||
elixir-version: '1.14.5' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if we want to put these versions in the env vars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be useful, but as a separate PR. There I simply copied what we have in other steps.
1 2 3 | ||
4 5 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, it is copied as is from postgres.js
test folder. I haven't really checked if that is used anywhere in test suite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's try to run it without this file :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have found that it is used in one test:
t('Copy from file', async() => {
await sql`create table test (x int, y int, z int)`
await new Promise(async r => fs
.createReadStream(rel('copy.csv'))
.pipe(await sql`copy test from stdin`.writable())
.on('finish', r)
)
return [
JSON.stringify(await sql`select * from test`),
'[{"x":1,"y":2,"z":3},{"x":4,"y":5,"z":6}]',
await sql`drop table test`
]
})
f6d8907
to
458fc9d
Compare
What kind of change does this PR introduce?
Add integration tests against Postgres.js Node library.